﻿using Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DormMS.Model;
using DormMS.Model.SearchModels.Draw;
using DormMS.Model.ViewModels;
using DormMS.Model.ViewModels.Draw;

namespace DormMS.IService
{
    public interface IDrawDormMSService
    {
        List<DrawVM> GetDrawList(DrawSearchModel search, out int total);

        /// <summary>
        /// 获取所有可用的商品，用来供新建奖品时选择
        /// </summary>
        /// <returns></returns>
        List<ProductVM> GetActProducts();

        /// <summary>
        /// 获取可用的优惠券
        /// </summary>
        /// <returns></returns>
        List<ProductVM> GetActCoupons();

        List<DrawRewardVM> GetRewardList(DrawRewardSearchModel search,out int total);

        /// <summary>
        /// 保存奖项，将更新所有奖项的StartValue和EndValue
        /// </summary>
        /// <param name="reward"></param>
        /// <param name="result"></param>
        /// <returns></returns>
        Result SaveReward(DrawReward reward, Result result);

        /// <summary>
        /// 获取抽奖记录列表
        /// </summary>
        /// <param name="search"></param>
        /// <param name="total"></param>
        /// <returns></returns>
        List<DrawRecordVM> GetRecordList(DrawRecordSearchModel search, out int total);

        /// <summary>
        /// 获取带规格的商品详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        SpecResponse GetSpecById(int id);
    }
}
